package models

type ShareModel struct {
	MODEL
	ShareUrl  string    `json:"share_url" gorm:"column:share_url;comment:分享链接"`
	FileModel FileModel `gorm:"foreignkey:FileID;constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;" json:"-"`
	FileID    uint      `json:"file_id" gorm:"column:file_id;default:0;comment:文件id"`
	IsCancel  int       `json:"is_cancel" gorm:"column:is_cancel;type:smallint(1);comment:是否取消分享"`
	UserModel UserModel `gorm:"foreignkey:UserID;constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;" json:"-"`
	UserID    uint      `json:"user_id" gorm:"default:0;comment:用户id"`
}
